home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib / tclx / Keylist.man < prev    next >
Encoding:
Text File  |  1991-11-19  |  5.4 KB  |  233 lines

  1. .\"----------------------------------------------------------------------------
  2. .\" The definitions below are for supplemental macros used in Sprite
  3. .\" manual entries.
  4. .\"
  5. .\" .HS name section [date [version]]
  6. .\"    Replacement for .TH in other man pages.  See below for valid
  7. .\"    section names.
  8. .\"
  9. .\" .AP type name in/out [indent]
  10. .\"    Start paragraph describing an argument to a library procedure.
  11. .\"    type is type of argument (int, etc.), in/out is either "in", "out",
  12. .\"    or "in/out" to describe whether procedure reads or modifies arg,
  13. .\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  14. .\"    needed;  use .AS below instead)
  15. .\"
  16. .\" .AS [type [name]]
  17. .\"    Give maximum sizes of arguments for setting tab stops.  Type and
  18. .\"    name are examples of largest possible arguments that will be passed
  19. .\"    to .AP later.  If args are omitted, default tab stops are used.
  20. .\"
  21. .\" .BS
  22. .\"    Start box enclosure.  From here until next .BE, everything will be
  23. .\"    enclosed in one large box.
  24. .\"
  25. .\" .BE
  26. .\"    End of box enclosure.
  27. .\"
  28. .\" .VS
  29. .\"    Begin vertical sidebar, for use in marking newly-changed parts
  30. .\"    of man pages.
  31. .\"
  32. .\" .VE
  33. .\"    End of vertical sidebar.
  34. .\"
  35. .\" .DS
  36. .\"    Begin an indented unfilled display.
  37. .\"
  38. .\" .DE
  39. .\"    End of indented unfilled display.
  40. .\"
  41. '    # Heading for Sprite man pages
  42. .de HS
  43. .if '\\$2'cmds'       .TH \\$1 1 \\$3 \\$4
  44. .if '\\$2'lib'        .TH \\$1 3 \\$3 \\$4
  45. .if '\\$2'tcl'        .TH \\$1 3 \\$3 \\$4
  46. .if '\\$2'tk'         .TH \\$1 3 \\$3 \\$4
  47. .if t .wh -1.3i ^B
  48. .nr ^l \\n(.l
  49. .ad b
  50. ..
  51. '    # Start an argument description
  52. .de AP
  53. .ie !"\\$4"" .TP \\$4
  54. .el \{\
  55. .   ie !"\\$2"" .TP \\n()Cu
  56. .   el          .TP 15
  57. .\}
  58. .ie !"\\$3"" \{\
  59. .ta \\n()Au \\n()Bu
  60. \&\\$1    \\fI\\$2\\fP    (\\$3)
  61. .\".b
  62. .\}
  63. .el \{\
  64. .br
  65. .ie !"\\$2"" \{\
  66. \&\\$1    \\fI\\$2\\fP
  67. .\}
  68. .el \{\
  69. \&\\fI\\$1\\fP
  70. .\}
  71. .\}
  72. ..
  73. '    # define tabbing values for .AP
  74. .de AS
  75. .nr )A 10n
  76. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  77. .nr )B \\n()Au+15n
  78. .\"
  79. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  80. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  81. ..
  82. '    # BS - start boxed text
  83. '    # ^y = starting y location
  84. '    # ^b = 1
  85. .de BS
  86. .br
  87. .mk ^y
  88. .nr ^b 1u
  89. .if n .nf
  90. .if n .ti 0
  91. .if n \l'\\n(.lu\(ul'
  92. .if n .fi
  93. ..
  94. '    # BE - end boxed text (draw box now)
  95. .de BE
  96. .nf
  97. .ti 0
  98. .mk ^t
  99. .ie n \l'\\n(^lu\(ul'
  100. .el \{\
  101. .\"    Draw four-sided box normally, but don't draw top of
  102. .\"    box if the box started on an earlier page.
  103. .ie !\\n(^b-1 \{\
  104. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  105. .\}
  106. .el \}\
  107. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  108. .\}
  109. .\}
  110. .fi
  111. .br
  112. .nr ^b 0
  113. ..
  114. '    # VS - start vertical sidebar
  115. '    # ^Y = starting y location
  116. '    # ^v = 1 (for troff;  for nroff this doesn't matter)
  117. .de VS
  118. .mk ^Y
  119. .ie n 'mc \s12\(br\s0
  120. .el .nr ^v 1u
  121. ..
  122. '    # VE - end of vertical sidebar
  123. .de VE
  124. .ie n 'mc
  125. .el \{\
  126. .ev 2
  127. .nf
  128. .ti 0
  129. .mk ^t
  130. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  131. .sp -1
  132. .fi
  133. .ev
  134. .\}
  135. .nr ^v 0
  136. ..
  137. '    # Special macro to handle page bottom:  finish off current
  138. '    # box/sidebar if in box/sidebar mode, then invoked standard
  139. '    # page bottom macro.
  140. .de ^B
  141. .ev 2
  142. 'ti 0
  143. 'nf
  144. .mk ^t
  145. .if \\n(^b \{\
  146. .\"    Draw three-sided box if this is the box's first page,
  147. .\"    draw two sides but no top otherwise.
  148. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  149. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  150. .\}
  151. .if \\n(^v \{\
  152. .nr ^x \\n(^tu+1v-\\n(^Yu
  153. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  154. .\}
  155. .bp
  156. 'fi
  157. .ev
  158. .if \\n(^b \{\
  159. .mk ^y
  160. .nr ^b 2
  161. .\}
  162. .if \\n(^v \{\
  163. .mk ^Y
  164. .\}
  165. ..
  166. '    # DS - begin display
  167. .de DS
  168. .RS
  169. .nf
  170. .sp
  171. ..
  172. '    # DE - end display
  173. .de DE
  174. .fi
  175. .RE
  176. .sp .5
  177. ..
  178. .\"----------------------------------------------------------------------------
  179. .HS "Keyed Lists" tcl
  180. .BS
  181. '@index: Tcl_GetKeyedListField Tcl_SetKeyedListField Tcl_DeleteKeyedListField
  182. .SH NAME
  183. Tcl_GetKeyedListField, Tcl_SetKeyedListField, Tcl_DeleteKeyedListField -
  184. Keyed list management routines.
  185. .SH SYNOPSIS
  186. .nf
  187. \fB#include <tclExtend.h>\fR
  188. .sp
  189. int
  190. \fBTcl_GetKeyedListField\fR (\fIinterp, fieldName, keyedList, fieldValuePtr\fR);
  191. .sp
  192. char *
  193. \fBTcl_SetKeyedListField\fR (\fIinterp, fieldName, fieldvalue, keyedList\fR);
  194. .sp
  195. char *
  196. \fBTcl_DeleteKeyedListField\fR (\fIinterp, fieldName, keyedList\fR);
  197. '
  198. .SH ARGUMENTS
  199. .AS Tcl_Interp **fieldValuePtr
  200. .AP Tcl_Interp *interp in
  201. Interpreter to use for error reporting.
  202. .AP "const char" *fieldName in
  203. The name of the field (the key) to perform the operation on.
  204. .AP "const char" *keyedList in
  205. The keyed list to perform the operation on.
  206. .AP char **fieldValuePtr out
  207. A pointer to a dynamicly allocated string containing the field value is
  208. returned here.
  209. .BE
  210.  
  211. .SH DESCRIPTION
  212. .PP
  213. These routines perform operations on keyed lists.  See the \fIExtended Tcl\fR 
  214. man page for a description of keyed lists.
  215. .PP
  216. \fBTcl_GetKeyedListField\fR retrieves a field value from a keyed list. It
  217. returns \fBTCL_OK\fR if the field was found, \fBTCL_BREAK\fR if the field was
  218. not found and \fBTCL_ERROR\fR if an error occured.  NULL maybe specifled for
  219. \fIfieldValuePtr\fR to check for the presences of a field without actually 
  220. extracting the value.
  221. .PP
  222. \fBTcl_SetKeyedListField\fR sets a field value in keyed list. It returns a
  223. pointer to a dynamically allocated string containing the new list, or NULL if
  224. an error occured.
  225. .PP
  226. \fBTcl_DeleteKeyedListField\fR deletes a field from keyed list. It returns a
  227. pointer to a dynamically allocated string containing the new list, or NULL if
  228. an error occured.
  229. '
  230. .SH KEYWORDS
  231. lists, keyed
  232.  
  233.